home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The AGA Experience 3
/
AGA Experience Volume 3 (1997)(NFA - SAdENESS)[!].iso
/
software
/
utilities
/
graphics
/
gfxlab24
/
arexxscripts
/
emptyscript.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-06-12
|
3KB
|
74 lines
/* This is an empty ARexx script, which can be used to create */
/* new ones. It is Unix-like shell proof, so that it can be */
/* launched from any type of shell, and can be given pattern and */
/* names in the command line. */
/* Example : */
/* */
/* rx emptyscript.rexx #?.gif */
/* rx emptyscript.rexx #?.gif b.jpeg c.ilbm d.iff */
/* Of course, under Csh and other Unix shells, you should not */
/* use #? but "*" instead. The reason is that unix shells don't */
/* send the pattern, but replace it directly by the corresponding */
/* file names and #? is not understood by Csh. */
/* You can use it safely, by just changing the inner loop, beside */
/* Address the GfxLab24 Arexx port */
ADDRESS GFXLAB24.0
options results
/* Put here your inits */
/* Print a message in GfxLab24 info window */
PrintInfo ''
PrintInfo '"Beginning of the emptyscript AREXX script"'
PrintInfo '"Script by UserName, date"'
GfxListIndex = 1 /* Scan all the names in the command line */
/* that was given to the script, starting */
/* with the value in 'GfxListIndex', until there */
/* is no more names in command line */
/* (while the current name is not empty) */
DO UNTIL word(arg(1),GfxListIndex)=''
/* Get name from the command line */
GfxMyList = WORD(arg(1), GfxListIndex)
GfxListIndex = GfxListIndex + 1
/* GetFromPattern is a GfxLab24 function that */
/* return a list of filenames corresponding to */
/* the given argument. This argument should be */
/* a pattern, but a single filename is ok and */
/* bug-proof. */
GetFromPattern GfxMyList
GfxMyList = result
if (WORD(GfxMyList,1)="ERROR") Then Exit
GfxsubListIndex = 1
DO UNTIL word(GfxMyList,GfxsubListIndex)=''
FileName = word(GfxMyList,GfxsubListIndex)
GfxsubListIndex = GfxsubListIndex +1
PrintInfo '"Processing 'FileName '"'
Load FileName /* Load the picture */
if result = "OK" then
DO
/* Add want you want here */
/* Free empty space for you script ... :) */
END
END
END
PrintInfo '"End of the Empty Script"'